Provider

Provider acts as a producer of widgets that are placed as child in Element.

class Aduct.Provider.Provider(*args, **kwargs)

This a template that gives an idea of methods a Provider must have. Unless otherwise stated, all the description of methods are generalised expected behavior of a Provider.

clear_child(child_dict)

Clears the given child.

Parameters:child_dict (dict) – A dictionary with properties of the child.
get_a_child(child_name)

Gets a child with given name.

Parameters:child_name (str) – The name of child to be retrieved.
Returns:A dictionary with properties of child.
Return type:dict
get_child_from_props(props)

Gets a child based on given interface properties.

Parameters:props (dict) – The interface properties for child.
Returns:A dictionary with properties of child.
Return type:dict
get_child_props(child_name, child, header_child)

Gets the interface properties from given values.

Parameters:
  • child_name (str) – The name of child.
  • child (Gtk.Widget) – The child produced by self.
  • header_child (Gtk.Widget) – The header child produced by self.
Returns:

A dictionary with interface properties of child.

Return type:

dict

get_name()

Gets the name of the provider.

Returns:The name of provider.
Return type:str